Implement the Search keyboard shortcut
authorFederico Mena Quintero <federico@gnome.org>
Mon, 10 Dec 2012 23:26:46 +0000 (17:26 -0600)
committerFederico Mena Quintero <federico@gnome.org>
Mon, 10 Dec 2012 23:26:53 +0000 (17:26 -0600)
We still lack a button to activate Search, like in Nautilus, but that will come later.

And with this, the last REMOVE_FOR_PLACES_SIDEBAR is gone!

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
gtk/gtkfilechooserdefault.c

index e677f840590289cf4311a283b8d98c5a949cbe1d..4c4e54f477f1231e7792a51cf52e77982302fe9f 100644 (file)
@@ -18,8 +18,6 @@
  */
 
 /* TODO:
- *
- * * Fix instances of "#if REMOVE_FOR_PLACES_SIDEBAR"
  *
  * * Fix FIXME-places-sidebar
  */
@@ -7493,18 +7491,13 @@ desktop_folder_handler (GtkFileChooserDefault *impl)
 static void
 search_shortcut_handler (GtkFileChooserDefault *impl)
 {
-  if (impl->has_search)
-    {
-#if REMOVE_FOR_PLACES_SIDEBAR
-      switch_to_shortcut (impl, shortcuts_get_index (impl, SHORTCUTS_SEARCH));
-#endif
+  operation_mode_set (impl, OPERATION_MODE_SEARCH);
 
-      /* we want the entry widget to grab the focus the first
-       * time, not the browse_files_tree_view widget.
-       */
-      if (impl->search_entry)
-        gtk_widget_grab_focus (impl->search_entry);
-    }
+  /* we want the entry widget to grab the focus the first
+   * time, not the browse_files_tree_view widget.
+   */
+  if (impl->search_entry)
+    gtk_widget_grab_focus (impl->search_entry);
 }
 
 /* Handler for the "recent-shortcut" keybinding signal */